<% present entry do |entry_presenter| %>
  <% if entry_presenter.youtube_embed(url, :div) %>
    <%= entry_presenter.youtube_embed(url, :div) %>
  <% elsif entry_presenter.vimeo_embed(url, :div) %>
    <%= entry_presenter.vimeo_embed(url, :div) %>
  <% elsif entry_presenter.instagram_embed(url) %>
    <%= entry_presenter.instagram_embed(url) %>
  <% elsif page = entry_presenter.saved_page(url.to_s) %>
    <% if content = entry_presenter.page_content(page) %>
      <hr />
      <p class="post-meta new-section">
        <%= favicon_with_host(url.host) %> <%= url.host %>
      </p>
      <header class="entry-header">
        <%= link_to page.url, target: '_blank', rel: 'noopener noreferrer' do  %>
          <h1><%= page.title || "Untitled" %></h1>
        <% end %>
        <p class="post-meta">
          <% if page.author %>
            by <%= page.author %>
          <% end %>
        </p>
      </header>
      <div class="content-styles entry-final-content entry-type-default" data-behavior="view_link_markup_wrap entry_final_content external_links">
        <%= content.html_safe %>
      </div>
    <% end %>
  <% end %>
<% end %>
